package com.ruoyi.common.core.domain.entity;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 节点表 sys_dept
 * 
 * @author ruoyi
 */
public class SysDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 节点ID */
    private Long deptId;

    /** 父节点ID */
    private Long parentId;

    /** 祖级列表 */
    private String ancestors;

    /** 节点名称 */
    private String deptName;

    /** 显示顺序 */
    private Integer orderNum;

    /** 负责人 */
    private String leader;

    /** 联系电话 */
    private String phone;

    /** 邮箱 */
    private String email;

    /**
     * 绑定本地地址，或网卡
     */
    private String localAddr;
    /**
     * 单播监听端口
     */
    private int localPort;
    /**
     * 单播发送端口
     */
    private int localSendPort;
    /**
     * 组播地址
     */
    private String multicastAddr;
    /**
     * 组播监听端口
     */
    private int multicastPort;
    /**
     * 组播发送端口
     */
    private int multicastSendPort;
    /**
     * 广播监听端口
     */
    private int boardcastPort;
    /**
     * 广播发送端口
     */
    private int boardcastSendPort;
    /**
     * 节点类型：0 - 本级服务节点， 1 - 传输服务节点， 2 - 普通节点
     */
    private String nodeType;


    /** 节点状态:0正常,1停用 */
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 父节点名称 */
    private String parentName;

    /** 排除编号 */
    private Long excludeId;

    public Long getDeptId()
    {
        return deptId;
    }

    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public String getAncestors()
    {
        return ancestors;
    }

    public void setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
    }

    @NotBlank(message = "节点名称不能为空")
    @Size(min = 0, max = 30, message = "节点名称长度不能超过30个字符")
    public String getDeptName()
    {
        return deptName;
    }

    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }

    @NotNull(message = "显示顺序不能为空")
    public Integer getOrderNum()
    {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum)
    {
        this.orderNum = orderNum;
    }

    public String getLeader()
    {
        return leader;
    }

    public void setLeader(String leader)
    {
        this.leader = leader;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    @Size(min = 0, max = 16, message = "长度不能超过50个字符")
    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getNodeType() {
        return nodeType;
    }

    public void setNodeType(String nodeType) {
        this.nodeType = nodeType;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getParentName()
    {
        return parentName;
    }

    public void setParentName(String parentName)
    {
        this.parentName = parentName;
    }

    public String getLocalAddr() {
        return localAddr;
    }

    public void setLocalAddr(String localAddr) {
        this.localAddr = localAddr;
    }

    public int getLocalPort() {
        return localPort;
    }

    public void setLocalPort(int localPort) {
        this.localPort = localPort;
    }

    public int getLocalSendPort() {
        return localSendPort;
    }

    public void setLocalSendPort(int localSendPort) {
        this.localSendPort = localSendPort;
    }

    public String getMulticastAddr() {
        return multicastAddr;
    }

    public void setMulticastAddr(String multicastAddr) {
        this.multicastAddr = multicastAddr;
    }

    public int getMulticastPort() {
        return multicastPort;
    }

    public void setMulticastPort(int multicastPort) {
        this.multicastPort = multicastPort;
    }

    public int getMulticastSendPort() {
        return multicastSendPort;
    }

    public void setMulticastSendPort(int multicastSendPort) {
        this.multicastSendPort = multicastSendPort;
    }

    public int getBoardcastPort() {
        return boardcastPort;
    }

    public void setBoardcastPort(int boardcastPort) {
        this.boardcastPort = boardcastPort;
    }

    public int getBoardcastSendPort() {
        return boardcastSendPort;
    }

    public void setBoardcastSendPort(int boardcastSendPort) {
        this.boardcastSendPort = boardcastSendPort;
    }

    @JsonIgnore
    public Long getExcludeId()
    {
        return excludeId;
    }

    public void setExcludeId(Long excludeId)
    {
        this.excludeId = excludeId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deptId", getDeptId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("deptName", getDeptName())
            .append("orderNum", getOrderNum())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("email", getEmail()).append("nodeType", getNodeType())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
